<template>
  <div v-loading="loading" class="kg-container">
    <extractDataShower :result="result"></extractDataShower>
  </div>
</template>
<script>
import extractDataShower from "./components/extractDataShower.vue";

export default {
  name: "detail",
  components: {
    extractDataShower,
  },
  data: () => {
    return {
      result: {},
      loading: false,
    };
  },
  computed: {},
  created() {
    this.getKAInfo();
  },
  methods: {
    getKAInfo() {
      this.loading = true;
      this.$api.knowledgeGeneration
        .getKADetail({ recordId: this.$route.query.id })
        .then((res) => {
          const { code, data, message } = res.data;
          if (code !== 200) {
            console.log(message);
          }
          this.loading = false;
          this.result = JSON.parse(data.result);
        });
    },
  },
};
</script>
<style lang="scss" scoped>
.kg-container {
  background: #fff;
  padding: 20px;
  border-radius: 4px;
}
</style>
